# Contributor: fossdd <fossdd@pwned.life>
maintainer="team/phosh <fossdd@pwned.life>"
pkgname=xdg-desktop-portal-phosh
pkgver=0.42.0
pkgrel=0
pkgdesc="xdg-desktop-portal implementation using GTK/GNOME/Phosh"
url="https://gitlab.gnome.org/guidog/xdg-desktop-portal-phosh"
arch="all"
license="GPL-3.0-or-later"
depends="
	gsettings-desktop-schemas
	xdg-desktop-portal
	"
makedepends="
	gnome-desktop-dev
	libadwaita-dev
	meson
	xdg-desktop-portal-dev
	"
source="https://sources.phosh.mobi/releases/xdg-desktop-portal-phosh/xdg-desktop-portal-phosh-$pkgver.tar.xz"
options="!check" # no tests

build() {
	abuild-meson \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	# We don't ship systemd
	rm -fr "$pkgdir"/usr/lib/systemd
}

sha512sums="
6939b6a48444ecc71dbbf3f162728d021fe8799775549656632787f5e1f62dfa9812b10886bc88d21bc9789afd598ddd438408eb05cbdcde59ae732bb25dbe83  xdg-desktop-portal-phosh-0.42.0.tar.xz
"
